package studio.wetrack.dinner.domain;

import lombok.Data;

import javax.persistence.Entity;
import javax.persistence.Id;

/**
 * Created by zhanghong on 17/7/22.
 */
@Data
@Entity(name = "chopsticks")
public class Chopsticks {

    @Id
    long id;
    String material;

    boolean occupied;


    @Override
    public String toString() {
        return "Chopsticks{" +
                "id=" + id +
                ", material='" + material + '\'' +
                ", occupied=" + occupied +
                '}';
    }

    public boolean takeOneShare(Dish dish) {
        return dish.takeOneShare();
    }
}
